const appointmentDao = require('../dao/appointmentDao');
const serviceCommon = require('../util/serviceCommon');

const service = {
    handleGetAppointment: async (data) => {
        let result;
        result = await serviceCommon.getListMethod(appointmentDao, 'handleGetAppointment', data);
        return result;
    },
    handleSearchAppointment: async (data) => {
        let result;
        result = await serviceCommon.getListMethod(appointmentDao, 'handleSearchAppoint', data);
        return result;
    },
    handleGetAllSize: async () => {
        let result;
        result = await serviceCommon.getSizeMethod(appointmentDao, 'handleGetAllSize');
        return result;
    },
    handleGetSearchSize: async (data) => {
        let result;
        result = await serviceCommon.getSizeMethod(appointmentDao, 'handleGetSearchSize', data);
        return result;
    },
    handleDeleteAppointment: async (data) => {
        let result;
        result = await serviceCommon.deleteDataMethod(appointmentDao, 'handleDeleteAppointment', data);
        return result;
    },
    handleEditAppointment: async (data) => {
        let result;
        result = await serviceCommon.editDataMethod(appointmentDao, 'handleEditAppointment', data);
        return result;
    }
};
module.exports = service;